package com.monkeybrother.thread.pool;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class TestScheduledExecutor {
    public static void main(String[] args) {
        ScheduledExecutorService ex = Executors.newScheduledThreadPool(2);
        ex.schedule(() -> System.out.println("sleep...."), 10, TimeUnit.SECONDS);
    }
}
